﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cool.Core.ComDto;
using Cool.Core.Entities.System;
using Cool.Core.Enums;

namespace Cool.Core.Managers
{
    public interface IUserManager
    {

        /// <summary>
        /// 获取用户 Id
        /// </summary>
        int UserId { get; }

        /// <summary>
        /// 获取用户信息
        /// </summary>
        SysUser User { get; }

        /// <summary>
        /// 当前用户角色集合
        /// </summary>
        List<SysRole> Roles { get; }

        /// <summary>
        /// 检查用户是否有效
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="tracking"></param>
        /// <returns></returns>
        Task<SysUser> CheckUserAsync(int userId, bool tracking = true);

        /// <summary>
        /// 获取当前用户接口权限
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<string> GetSecuritiesAsync(int userId);

        /// <summary>
        /// 获取当前用户角色下的部门权限ID
        /// </summary>
        /// <returns></returns>
        List<int> GetDeptCustomsByRoles();

    }
}
